<template>
    <div class="swiper-container">
    <div class="swiper-wrapper">
        <div class="swiper-slide">
          <img src="http://dummyimage.com/(375x200)" alt="">
        </div>
        <div class="swiper-slide">
          <img src="http://dummyimage.com/(375x200)" alt="">
        </div>
        <div class="swiper-slide">
          <img src="http://dummyimage.com/(375x200)" alt="">
        </div>
    </div>
    <!-- 如果需要分页器 -->
    <div class="swiper-pagination"></div>
    
    <!-- 如果需要导航按钮 -->
    <div class="swiper-button-prev"></div>
    <div class="swiper-button-next"></div>
    
    <!-- 如果需要滚动条 -->
    <div class="swiper-scrollbar"></div>
</div>
</template>
<script>
import Swiper from 'swiper'
import 'swiper/css/swiper.css'
export default {
  mounted(){
    new Swiper('.swiper-container',{
      
      loop:true,
      autoplay:true,
      pagination:{
        el:".swiper-pagination"
      }
    })
  }
}
</script>
<style lang="scss" scoped>
.swiper-container{
  width: 100%;
  height: 200px;
  img{
    width: 100%;
  height: 100%;
  }
}
</style>